﻿<%@ Page Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true" CodeFile="SitiosEjecucionMultiplesZonas.aspx.cs" Inherits="SitiosEjecucionMultiplesZonas" Title="Untitled Page" %>

<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<%@ Register Assembly="UsrControls" Namespace="UsrControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script>
    
    
    function grid_SelectionChanged(s, e) {
                s.GetSelectedFieldValues("MUNICIPIO", GetSelectedFieldValuesCallback);
        }
        
   function GetSelectedFieldValuesCallback(values) {    
            selList.BeginUpdate();
            try {
                selList.ClearItems();
                for(var i = 0; i < values.length; i ++) {
                    selList.AddItem(values[i]);
                }
            } finally {
                selList.EndUpdate();
            }
            document.getElementById("selCount").innerHTML = grid.GetSelectedRowCount();
        }
    


    </script>
   <table width="100%" border="0" cellpadding="0" cellspacing="0">
       <tr>
           <td class="campo" style="width: 50%">
               <anthem:Label ID="lblMensaje" runat="server" AutoUpdateAfterCallBack="True" UpdateAfterCallBack="True"
                   Visible="False"></anthem:Label></td>
           <td class="campo" colspan="2">
           </td>
       </tr>
                    <tr>
                        <td style="width: 50%" class="campo">
                            <strong>Lugar de Ejecución&nbsp;
                                <div class="toolbar">
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CssClass="regresar"
                                        ImageUrl="~/Imagenes/bt-regresar.gif" OnClick="btnRegresar_Click" ToolTip="Regresar Meta" />
                                    <cc1:wccacciones id="WccAcciones1" runat="server" addcausesvalidation="False" addenablecallback="False"
                                        archivevisible="False" auditvisible="False" declinevisible="False" deleteenablecallback="True"
                                        deleteprecallbackfunction="delete_PreCallBack" onadd_onclick="WccAcciones1_Add_OnClick"
                                        publishvisible="False" updatecausesvalidation="False" updateenablecallback="False"
                                        updateonclickfunction="return confirmEdit();" validatevisible="False" DeleteVisible="False" UpdateVisible="False"></cc1:wccacciones>
                                </div>
                            </strong></td>
                        <td class="campo" colspan="2">
                            <strong>Zonas Seleccionadas:</strong>
                        </td>
                    </tr>
                    <tr>
                        <td class="campo">
                            <dxwgv:ASPxGridView ID="gridZonas" ClientInstanceName="grid" runat="server" AutoGenerateColumns="False"
                                KeyFieldName="ZON_ID" Width="100%" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                CssPostfix="PlasticBlue" Theme="PlasticBlue">
                                <Columns>
                                    <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Caption="Marcar">
                                        <HeaderTemplate>
                                            <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="Marcar/Desmarcar todas las filas de esta pagina" />
                                        </HeaderTemplate>
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ClearFilterButton Visible="True">
                                        </ClearFilterButton>
                                    </dxwgv:GridViewCommandColumn>
                                    <dxwgv:GridViewDataTextColumn FieldName="ZON_ID" Visible="False" VisibleIndex="1">
                                    </dxwgv:GridViewDataTextColumn>
                                    <dxwgv:GridViewDataTextColumn FieldName="DEPARTAMENTO" VisibleIndex="1">
                                    </dxwgv:GridViewDataTextColumn>
                                    <dxwgv:GridViewDataTextColumn FieldName="MUNICIPIO" VisibleIndex="2">
                                    </dxwgv:GridViewDataTextColumn>
                                </Columns>
                                <ClientSideEvents SelectionChanged="grid_SelectionChanged" />
                                <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
                                    <Header ImageSpacing="10px" SortingImageSpacing="10px">
                                    </Header>
                                 
                                </Styles>
                                <SettingsPager ShowDefaultImages="False">
                                    <AllButton Text="All" Visible="True">
                                    </AllButton>
                                    <NextPageButton Text="Next &gt;">
                                    </NextPageButton>
                                    <PrevPageButton Text="&lt; Prev">
                                    </PrevPageButton>
                                </SettingsPager>
                             
                                <StylesEditors>
                                    <CalendarHeader Spacing="11px">
                                    </CalendarHeader>
                                    <ProgressBar Height="25px">
                                    </ProgressBar>
                                </StylesEditors>
                            </dxwgv:ASPxGridView>
                        </td>
                        <td style="width: 250px" class="campo">
                            <dxe:ASPxListBox ID="ASPxListBox1" ClientInstanceName="selList" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue"
                                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                                <ValidationSettings>
                                    <ErrorFrameStyle ImageSpacing="4px">
                                        <ErrorTextPaddings PaddingLeft="4px" />
                                    </ErrorFrameStyle>
                                </ValidationSettings>
                                <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                                </LoadingPanelImage>
                            </dxe:ASPxListBox>
                        </td>
                        <td class="campo">
                            <p>
                                Conteo Zonas: <span id="selCount" style="font-weight: bold">0</span>
                            </p>
                        </td>
                    </tr>
                </table>
</asp:Content>

